home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / Sample Editors⁄Viewers / Picture Viewer / PictureViewer.make < prev   
Encoding:
Text File  |  1995-12-06  |  8.9 KB  |  259 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        PictureViewer.make
  3. #
  4. #    Contains:    Makefile for OpenDoc PictureViewer part
  5. #
  6. #    Written by:    Sue Dumont
  7. #
  8.  
  9. #---------------------------------------------------------------------------    
  10. # PROJECT VARIABLES
  11. #---------------------------------------------------------------------------    
  12.  
  13. TargetName = PictureViewer
  14. TargetNameILink = {TargetName} (68k)
  15. TargetNamePPCLink = {TargetName} (PPC)
  16. TargetNameFat = {TargetName} (fat)
  17.  
  18. TargetCreatorType = PCVW
  19.  
  20. AdditionalIncludes = -i "{SourceDir}"
  21.  
  22. #---------------------------------------------------------------------------    
  23. # CFM/PEF Version Numbers
  24. #---------------------------------------------------------------------------    
  25. # For detailed instructions on proper CFM/PEF version numbering, see
  26. # Code Fragment Chapter (pg 3-7), Inside Macintosh: PowerPC System Software
  27. #---------------------------------------------------------------------------    
  28.  
  29. CurrentLibraryVersion =        0x01008000        # 1.0 Final
  30. LibraryExportsVersion =        0x00000000        # 0.0
  31. LibraryCodeVersion =        0x00000000        # 0.0
  32.  
  33. #---------------------------------------------------------------------------    
  34. # DIRECTORY DEPENDENCIES
  35. #---------------------------------------------------------------------------    
  36.  
  37. "{TargetDir}"  ƒ "{SourceDir}"
  38. "{ObjectsDir}" ƒ "{SourceDir}"
  39. "{ObjectsDir}" ƒ "{ODUtilsImplDir}"
  40.  
  41.  
  42. #---------------------------------------------------------------------------    
  43. # ROOT TARGET
  44. #---------------------------------------------------------------------------    
  45.  
  46. BUILDPPCLINK ƒ     ∂
  47.     "{CppPrecompiledHeaders}"                ∂
  48.     "{TargetDir}{TargetNamePPCLink}"        ∂
  49.     "{SourceDir}PictureViewer.exp"
  50.  
  51. BUILDREZ ƒ ∂
  52.     "{ObjectsDir}{TargetName}.PPC.rsrc"    ∂
  53.     "{ObjectsDir}{TargetName}.68k.rsrc"
  54.  
  55. BUILDILINK ƒ ∂
  56.     "{CppPrecompiledHeaders}"                ∂
  57.     "{TargetDir}{TargetNameILink}"            ∂
  58.     "{SourceDir}PictureViewer.exp"
  59.  
  60. BUILDIDL ƒ ∂
  61.     "{SourceDir}PictureViewer.xih"    ∂
  62.     "{SourceDir}PictureViewer.xh"    ∂
  63.     "{SourceDir}PictureViewer.exp"
  64.  
  65.     
  66. #---------------------------------------------------------------------------    
  67. # FILE LIST VARIABLES
  68. #---------------------------------------------------------------------------    
  69.  
  70. PictureViewerOBJECTS = ∂
  71.     "{ObjectsDir}PictureViewer.cpp.o"            ∂
  72.     "{ObjectsDir}PictureViewerGlobals.cpp.o"    ∂
  73.     "{ObjectsDir}PictureViewerUtils.cpp.o"        ∂
  74.     "{ObjectsDir}PictureViewerInit.cpp.o"        ∂
  75.     "{ObjectsDir}SampleCollections.cpp.o"        ∂
  76.             
  77. OpenDocUtilityOBJECTS = ∂
  78.     "{ObjectsDir}AltPoint.cpp.o"             ∂
  79.     "{ObjectsDir}AltPoly.cpp.o"             ∂
  80.     "{ObjectsDir}BndNSUtl.cpp.o"             ∂
  81.     "{ObjectsDir}Crawl.cpp.o"                 ∂
  82.     "{ObjectsDir}DocUtils.cpp.o"             ∂
  83.     "{ObjectsDir}Except.cpp.o"                 ∂
  84.     "{ObjectsDir}FocusLib.cpp.o"             ∂
  85.     "{ObjectsDir}IText.cpp.o"                 ∂
  86.     "{ObjectsDir}FlipEnd.cpp.o"             ∂
  87.     "{ObjectsDir}ISOStr.cpp.o"                 ∂
  88.     "{ObjectsDir}LinkList.cpp.o"             ∂
  89.     "{ObjectsDir}NmSpcUtl.cpp.o"             ∂
  90.     "{ObjectsDir}ODDebug.cpp.o"             ∂
  91.     "{ObjectsDir}ODMemory.cpp.o"            ∂
  92.     "{ObjectsDir}ODNew.cpp.o"                ∂
  93.     "{ObjectsDir}ODUtils.cpp.o"                ∂
  94.     "{ObjectsDir}PasclStr.cpp.o"            ∂
  95.     "{ObjectsDir}PlfmFile.cpp.o"             ∂
  96.     "{ObjectsDir}StorUtil.cpp.o"            ∂
  97.     "{ObjectsDir}StdTypIO.cpp.o"            ∂
  98.     "{ObjectsDir}TempIter.cpp.o"            ∂
  99.     "{ObjectsDir}TempObj.cpp.o"             ∂
  100.     "{ObjectsDir}UseRsrcM.cpp.o"             ∂
  101.     "{ObjectsDir}WinUtils.cpp.o"
  102.  
  103.             
  104. #---------------------------------------------------------------------------    
  105. # DEPENDENCIES
  106. #---------------------------------------------------------------------------    
  107.  
  108. # IDL
  109.  
  110. "{SourceDir}"PictureViewer.cpp ƒ                     ∂
  111.     "{SourceDir}"PictureViewer.idl                     ∂
  112.     "{ODIDLIntfDir}"Part.idl
  113.     
  114. "{SourceDir}"PictureViewer.xih ƒ                    ∂
  115.     "{SourceDir}"PictureViewer.xh                    ∂
  116.     "{SourceDir}"PictureViewer.idl                     ∂
  117.     "{ODIDLIntfDir}"Part.idl
  118.     
  119. "{SourceDir}"PictureViewer.xh ƒ                        ∂
  120.     "{SourceDir}"PictureViewer.idl                    ∂
  121.     "{ODIDLIntfDir}"Part.idl
  122.  
  123. # SOURCE/OBJECT CODE
  124.  
  125. "{ObjectsDir}PictureViewerInit.cpp.o"    ƒ            ∂
  126.     "{CppPrecompiledHeaders}"                        ∂
  127.     "{SourceDir}PictureViewerInit.cpp"                ∂
  128.     "{SourceDir}PictureViewer.xh"
  129.  
  130. "{ObjectsDir}PictureViewer.cpp.o"    ƒ                ∂
  131.     "{CppPrecompiledHeaders}"                        ∂
  132.     "{SourceDir}PictureViewer.cpp"                     ∂
  133.     "{SourceDir}PictureViewer.xih"                     ∂
  134.     "{SourceDir}PictureViewerDef.h"                 ∂
  135.     "{SourceDir}PictureViewerUtils.h"                
  136.  
  137. "{ObjectsDir}PictureViewerUtils.cpp.o"    ƒ            ∂
  138.     "{CppPrecompiledHeaders}"                        ∂
  139.     "{SourceDir}PictureViewerUtils.cpp"                ∂
  140.     "{SourceDir}PictureViewerUtils.h"                
  141.  
  142. "{ObjectsDir}SampleCollections.cpp.o"    ƒ            ∂
  143.     "{CppPrecompiledHeaders}"                        ∂
  144.     "{SourceDir}SampleCollections.cpp"                ∂
  145.     "{SourceDir}SampleCollections.h"
  146.  
  147. #---------------------------------------------------------------------------    
  148. # BUILD LIBRARIES
  149. #---------------------------------------------------------------------------    
  150.  
  151. # --- 68k Link ---
  152.  
  153. "{TargetDir}{TargetNameILink}" ƒƒ     {PictureViewerOBJECTS}            ∂
  154.                                     {OpenDocUtilityOBJECTS}            ∂
  155.                                     "{SourceDir}PictureViewer.exp"
  156.     Echo Linking: {TargetNameILink}
  157.     {LinkTool}    ∂
  158.         -export `ConvertExportList "{SourceDir}PictureViewer.exp"` ∂
  159.         {ILinkOptions}                                        ∂
  160.         {ILinkShLibOptions}                                    ∂
  161.         -init PictureViewerCFMInit                            ∂
  162.         -vercur {CurrentLibraryVersion}                        ∂
  163.         -verdef {LibraryExportsVersion}                        ∂
  164.         -verimp {LibraryCodeVersion}                        ∂
  165.         {ShLibPreLibraries}                                    ∂
  166.         {PictureViewerOBJECTS}                                ∂
  167.         {OpenDocUtilityOBJECTS}                                ∂
  168.         "{ODCFMLibrariesDir}OpenDoc Core.stub"                ∂
  169.         "{ODCFMLibrariesDir}OpenDoc User Interface.stub"    ∂
  170.         "{ODCFMLibrariesDir}OpenDoc Storage.stub"            ∂
  171.         "{ODCFMLibrariesDir}OpenDoc Imaging.stub"            ∂
  172.         "{ODCFMLibrariesDir}OpenDoc Layout.stub"            ∂
  173.         "{ODCFMLibrariesDir}Memory Manager.stub"            ∂
  174. #        "{SharedLibraries}DragLib"                            ∂
  175.         {ShLibPostLibraries}                                ∂
  176.         -o "{ObjectsDir}{TargetNameILink}".seg
  177.     If !{Status}
  178.         Echo Building: {TargetNameILink}.SYM
  179.         {SymTool} "{ObjectsDir}{TargetNameILink}".seg.NJ    ∂
  180.             -o "{TargetDir}{TargetNameILink}".SYM -sym 3.2
  181.         Echo Building: {TargetNameILink}∂'s code∂/data fragment
  182.         MakeFlat "{ObjectsDir}{TargetNameILink}".seg -o "{TargetDir}{TargetNameILink}"
  183.         Echo Copying: {TargetNameILink}∂'s resources
  184.         Echo "include ∂"{RsrcObjectsDir}{TargetName}.68k.rsrc∂";" | Rez -a -o "{TargetDir}{TargetNameILink}"
  185.         Echo "delete 'ckid';"  | Rez -a -o "{TargetDir}{TargetNameILink}"
  186.         SetFile -a Bi -c "{TargetCreatorType}" {Targ}
  187.     End
  188.  
  189. # --- PowerPC Link ---
  190.  
  191. "{TargetDir}{TargetNamePPCLink}" ƒƒ        {PictureViewerOBJECTS}            ∂
  192.                                         {OpenDocUtilityOBJECTS}            ∂
  193.                                         "{SourceDir}PictureViewer.exp"
  194.     Echo Linking: {TargetNamePPCLink}
  195.     {LinkTool}    ∂
  196.         -export `ConvertExportList "{SourceDir}PictureViewer.exp"` ∂
  197.         {PPCLinkOptions}                                    ∂
  198.         {PPCLinkShLibOptions}                                ∂
  199.         -init PictureViewerCFMInit                            ∂
  200.         -verCur {CurrentLibraryVersion}                        ∂
  201.         -verDef {LibraryExportsVersion}                        ∂
  202.         -verImp {LibraryCodeVersion}                        ∂
  203.         {PPCShLibPreLibraries}                                ∂
  204.         {PictureViewerOBJECTS}                                ∂
  205.         {OpenDocUtilityOBJECTS}                                ∂
  206.         "{ODCFMLibrariesDir}OpenDoc Core.stub"                ∂
  207.         "{ODCFMLibrariesDir}OpenDoc User Interface.stub"    ∂
  208.         "{ODCFMLibrariesDir}OpenDoc Storage.stub"            ∂
  209.         "{ODCFMLibrariesDir}OpenDoc Imaging.stub"            ∂
  210.         "{ODCFMLibrariesDir}OpenDoc Layout.stub"            ∂
  211.         "{ODCFMLibrariesDir}Memory Manager.stub"            ∂
  212.         {PPCShLibPostLibraries}                                ∂
  213.         -o "{ObjectsDir}{TargetNamePPCLink}"
  214.     If !{Status}
  215.         Move "{ObjectsDir}{TargetNamePPCLink}" "{TargetDir}"
  216.         Echo Building: {TargetNamePPCLink}.xSYM
  217.         {SymTool} "{ObjectsDir}{TargetNamePPCLink}".xcoff            ∂
  218.                 {AdditionalIncludes} -i "{ODUtilsImplDir}"            ∂
  219.                 -sym on,3.2 -o "{TargetDir}{TargetNamePPCLink}".xSYM
  220.         Echo Copying: {TargetNamePPCLink}∂'s resources
  221.         Echo "include ∂"{RsrcObjectsDir}{TargetName}.PPC.rsrc∂";" | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  222.         Echo "delete 'ckid';"  | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  223.         SetFile -a Bi -c "{TargetCreatorType}" {Targ}
  224.     End
  225.  
  226.  
  227. #---------------------------------------------------------------------------    
  228. # REZ STEPS
  229. #---------------------------------------------------------------------------    
  230. "{RsrcObjectsDir}{TargetName}.PPC.rsrc"    ƒ                                    ∂
  231.                                         "{SourceDir}PictureViewer.r"        ∂
  232.                                         "{SourceDir}PictureViewerDef.h"        ∂
  233.                                         "{SourceDir}PictureViewerVers.h"    ∂
  234.                                         "{SourceDir}PictureViewerOther.rsrc"
  235.     Echo Rezzing: {TargetName}.r (for PPC)
  236.     Rez {RezOptions} {ODRezIntf} "{SourceDir}{TargetName}.r" -o {targ}
  237.     Echo "delete 'ckid';"  | Rez -a -o {Targ}
  238.     SetFile -a i -c "{ResEditCreator}" -t "{ResEditFileType}" {Targ}
  239.     if ( `exists "{TargetDir}{TargetNamePPCLink}" != ""` )
  240.         Echo Copying: {TargetNamePPCLink}∂'s resources
  241.         Echo "include ∂""{Targ}"∂";" | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  242.     end    
  243.  
  244. "{RsrcObjectsDir}{TargetName}.68k.rsrc"    ƒ                                    ∂
  245.                                         "{SourceDir}PictureViewer.r"        ∂
  246.                                         "{SourceDir}PictureViewerDef.h"        ∂
  247.                                         "{SourceDir}PictureViewerVers.h"    ∂
  248.                                         "{SourceDir}PictureViewerOther.rsrc"
  249.     Echo Rezzing: {TargetName}.r (for 68k)
  250.     Rez -d _68KBUILD_ {RezOptions} {ODRezIntf} "{SourceDir}{TargetName}.r" -o {Targ} 
  251.     Echo "delete 'ckid';"  | Rez -a -o {Targ}
  252.     SetFile -a i -c "{ResEditCreator}" -t "{ResEditFileType}" {Targ}
  253.     if ( `exists "{TargetDir}{TargetNameILink}" != ""` )
  254.         Echo Copying: {TargetNameILink}∂'s resources
  255.         Echo "include ∂""{Targ}"∂";" | Rez -a -o "{TargetDir}{TargetNameILink}"
  256.     end
  257.  
  258.  
  259.